package com.data.modules.feign;

import com.data.common.api.vo.CrmResult;
import com.data.modules.contract.entity.vo.SettleSuppierRuleAddBo;
import com.data.modules.contract.entity.vo.SettleSuppierRuleSiteVo;
import com.data.modules.contract.entity.vo.SettleSuppierRuleVo;
import com.data.modules.contract.entity.vo.TipsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;
import java.util.Set;

/**
 * @Description: TODD
 * @InterfaceName: SettleJobService
 * @Auther: XWQ
 * @Date: 2021/6/22 16:25
 * @version: V1.0
 */
@FeignClient(url="${crm.settle-url:}",name = "settle", contextId = "settlejob")
public interface SettleService {

    /***
     * 合同转换规则Feign接口
     * @param settleRules
     * @return
     */
    @PostMapping("/settle/suppier/rule/addRuleFeign")
    CrmResult<List<TipsVo>> addRuleFeign(@Valid @RequestBody List<SettleSuppierRuleAddBo> settleRules);

    /**
     * 根据站点查看站点金额排名
     *
     * @param siteIds
     * @return
     */
    @PostMapping("/settle/suppier/rule/querySitePriceTop")
    CrmResult<List<SettleSuppierRuleSiteVo>> querySitePriceTop(@RequestBody Set<String> siteIds);
    /***
     * 查询规则当前适用的规则
     * @param ruleType
     * @return
     */
    @PostMapping("/settle/suppier/rule/siteRank")
    CrmResult<List<SettleSuppierRuleVo>> siteRank(@RequestBody Integer ruleType);

    /**
     * 根据站点名称查看站点结算人数、crm人数排名
     *
     * @param siteIds
     * @return
     */
    @PostMapping("/personProfitDetail/querySiteRateRankInfo")
    CrmResult<List<SettleSuppierRuleSiteVo>> querySiteRateRankInfo(@RequestBody Set<String> siteIds);


    /**
     * 根据站点名称 统计 用工单位-季节结算 周期内 上岗人数
     *
     * @param siteIds
     * @return
     */
    @PostMapping("/personProfitDetail/querySiteOnDutyRankInfo")
    CrmResult<List<SettleSuppierRuleSiteVo>> querySiteOnDutyRankInfo(@RequestBody Set<String> siteIds);
}
